<%@ Page Language="VB" AutoEventWireup="false" CodeFile="LookupTables.aspx.vb" MasterPageFile="~/Admin/Admin.master" Inherits="LookupTables" Title="Admin - Drop Down List Maintenance" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
<%@ Register Src="SubNavControls/DropdownSubNavControl.ascx" TagName="DropDownSubNavControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">

<uc1:DropDownSubNavControl ID="DropDownSubNavControl1" runat="server" />

<script language="javascript">
  function setScrollFromHidden(divElement,hiddenElement)
  {
     document.getElementById(divElement).scrollTop=document.getElementById(hiddenElement).value;
  }
</script>
<asp:ObjectDataSource ID="LookupTablesObjectDataSource" runat="server"
            DeleteMethod="RemoveInstance" InsertMethod="SaveInstance" SelectMethod="ListBySort" TypeName="Cdm.DataCore.LookupTables.LuCaseStatus"
            UpdateMethod="UpdateInstance" SortParameterName="sortExpr" ></asp:ObjectDataSource>
        
        <asp:ObjectDataSource ID="NewObjectDataSource" runat="server" DataObjectTypeName="Cdm.DataCore.LookupTables.LuCaseStatus"
            InsertMethod="SaveInstance" TypeName="Cdm.DataCore.LookupTables.LUCaseStatus" SelectMethod="getNew">
        </asp:ObjectDataSource>
        
        <asp:ObjectDataSource ID="LuDropDownObjectDataSource" runat="server" SelectMethod="ListLookups"
            TypeName="Cdm.DataCore.LookupTables.LuAdminTableList" DataObjectTypeName="Cdm.DataCore.LookupTables.LuAdminTableList" ConvertNullToDBNull="True"></asp:ObjectDataSource>
    <table cellpadding="0" cellspacing="0">
<tr><td style="width:20px;" rowspan="6"></td>
<td><h1><a id="pagecontent">Admin - Drop Down List Maintenance</a></h1></td>
    <td align="right" style="width:65%"><asp:Label ID="DropDownListsLabel" runat="server" Text="Select Drop Down List:" CssClass="adminSelectLabel" AssociatedControlID="LuTablesDropDownList"></asp:Label>
            <asp:DropDownList ID="LuTablesDropDownList" runat="server" CssClass="adminSelectForm" AutoPostBack="False"
                DataSourceID="LuDropDownObjectDataSource" DataTextField="DisplayName" DataValueField="ClassName">
            </asp:DropDownList>
            <asp:Button ID="SubmitTableButton" runat="server" Text="Go" /></td></tr>
        <tr><td colspan="2">
        <cc2:ScrollingGridView ID="LookupTablesScrollingGridView" IsFixedColumn="true" runat="server" ToolTip="175"
         CssClass="gridOffsetSmall" HorizontalAlign="center" Height="90%" CellPadding="5" Caption="Create and edit state-specific lists for some fields." CaptionAlign="Top" 
            AutoGenerateColumns="False" DataSourceID="LookupTablesObjectDataSource" DataKeyNames="Id" BorderColor="#21334B" BorderStyle="Solid" GridLines="Vertical" EmptyDataText="No data.  Click the <b>Add</b> button below to add an item." AllowSorting="true">
        <HeaderStyle CssClass="adminHeaderStyle" BackColor="#C3CAD4" bordercolor="#21334B" VerticalAlign="Top" />
        <RowStyle CssClass="adminColumnStyle" />
            <Columns>
                <asp:TemplateField HeaderText="Description" SortExpression="Description">
                    <ItemTemplate><%# Eval("Description") %></ItemTemplate>
                    <HeaderStyle Width="606px" />
                    <ItemStyle Width="600px" />
                    <EditItemTemplate>
                        <asp:TextBox ID="txtDescription" CssClass="form" runat="server" Text='<%# Bind("Description") %>' ToolTip="edit description"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" HeaderText="Action" AccessibleHeaderText="Action">
                    <ItemStyle HorizontalAlign="center" Width="110px" />
                    <HeaderStyle Width="110px" />
                </asp:CommandField>
                <asp:TemplateField HeaderText="Delete"  AccessibleHeaderText="Delete">
                    <ItemTemplate>
                        <asp:LinkButton ID="DeleteLinkButton" runat="server" CommandName="DeleteListItem">Delete</asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle Width="55px" HorizontalAlign="Center" />
                    <HeaderStyle Width="85px" />
                </asp:TemplateField>
            </Columns>
        <AlternatingRowStyle BackColor="#E8ECF4" />
        <EmptyDataRowStyle CssClass="headerStyle" BackColor="#C3CAD4" />
        </cc2:ScrollingGridView>
        </td><td colspan="2"> 
        
   </td></tr>
   <tr><td colspan="2"><asp:DetailsView ID="NewDetailsView" runat="server" CssClass="gridOffset" Width="525px" AutoGenerateRows="False" DataSourceID="NewObjectDataSource" DefaultMode="Insert" GridLines="none" Visible="false">
        <Fields>
            <asp:BoundField DataField="Description" HeaderText="Description:" HeaderStyle-CssClass="adminLabel" SortExpression="Description" />
        </Fields>  
    </asp:DetailsView></td></tr>
    <tr><td colspan="2"><cc2:ValidationErrorSummary ID="ErrorSummary" runat="server" Message="" Visible="false" /></td></tr>
       </table>           
    
    
</asp:Content>
<asp:Content ID="FixedContent" runat="server" ContentPlaceHolderID="ContentPlaceHolderFixedAdmin">
   <asp:Button ID="AddButton" runat="server" Text="Add" />
   <asp:Button ID="SubmitButton" runat="server" Text="Submit" Visible="false" />
    <asp:Button ID="CancelButton" runat="server" Text="Cancel" Visible="false" />
</asp:Content>